<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>待收货订单</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
    <script type="text/javascript" src="../shop-style/js/jquery.js"></script>
    <script type="text/javascript" src="../shop-style/js/index.js"></script>
    <script src="../shop-style/script/global.js" type="text/javascript"></script>
    <script src="../shop-style/script/head.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="../shop-style/css/main.css"/>
    <link rel="stylesheet" type="text/css" href="../shop-style/css/basic.css">
    <link rel="stylesheet" type="text/css" href="../shop-style/css/style.css" />
    <link rel="stylesheet" href="../shop-style/style/base.css" />
    <link rel="stylesheet" href="../shop-style/style/head.css" />

    <link rel="stylesheet" type="text/css" href="../../h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="../../h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="../../lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="../../h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="../../h-ui.admin/css/style.css" />
</head>
<body>

<!-- 插入公共模板 _top -->
<div th:replace="../templates/user/common/_top :: common_top"></div>

<!-- 插入公共模板 _headNav -->
<div th:replace="../templates/user/common/_headNav :: common_headNav"></div>


<!--中部 start-->
<div class="con_ny">
    <div class="danye">
        <!-- 左侧导航 start -->
        <!-- 插入公共模板 _user_center_left -->
        <div th:replace="../templates/user/common/_my_order_left :: common_my_order_left"></div>
        <!-- 左侧导航 end -->

        <!--单页详情开始-->
        <div class="danye_right">
            <div class="danye_dqbt">
                <span class="jj_t"></span>
                <span class="dq_dy">您的当前位置：<a th:href="@{/goodsAction/goIndex}">首页</a> >> 我的订单 >> 已完成订单</span>
            </div>
            <!--会员中心右侧开始-->
            <div class="hyzx_yc">
                <div class="mt-20">
                    <table class="table table-border table-bordered table-hover table-bg table-sort">
                        <thead>
                        <tr class="text-c">
                            <th>商品</th>
                            <th width="200">收货地址</th>
                            <th width="80">订单总金额</th>
                            <th width="70">下单时间</th>
                            <th width="70">发货时间</th>
                            <th width="40">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr class="text-c" th:each="orderVO : ${orderVOList}">
                            <td>
                                <div style="float:left">
                                    <th:block th:each="orderChildVO : ${orderVO.orderChildVOList}">
                                        <img style="width:40px" th:src="|@{'' + ${orderChildVO.goods.image} + ''}|" th:alt="${orderChildVO.goods.goodsName}"/>
                                        <span th:text="|${orderChildVO.goods.goodsName} x ${orderChildVO.quantity}件|"></span>
                                        <br/>
                                    </th:block>
                                </div>
                            </td>
                            <td th:text="|${orderVO.userReceive.receiveProvince} ${orderVO.userReceive.receiveCity} ${orderVO.userReceive.receiveCounty} ${orderVO.userReceive.receiveAddress}    (${orderVO.userReceive.contact} 收) ${orderVO.userReceive.tel}|"></td>
                            <td th:text="|¥${#numbers.formatDecimal(orderVO.totalAmount/100.0,1,2)}|"></td>
                            <td th:with="createTime=${orderVO.createTime}" th:text="${#dates.format(createTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
                            <td th:with="sendTime=${orderVO.sendTime}" th:text="${#dates.format(sendTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
                            <td class="td-manage">
                                <a title="删除" href="javascript:;" th:onclick="|order_del(this,${orderVO.orderId})|" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <!--会员中心右侧结束-->
        </div>
        <!--单页详情结束-->
    </div>
</div>
<!--中部 end-->


<div class="none" style="height:20px;"></div>

<div th:replace="../templates/user/common/_footer :: common_footer"></div>

<script type="text/javascript" src="../../../lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="../../../lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="../../../h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="../../../h-ui.admin/js/H-ui.admin.page.js"></script>
<script type="text/javascript">
    /*订单-删除*/
    function order_del(obj,orderId){
        layer.confirm('确认要删除吗？',function(index){
            $.ajax({
                type: "GET",
                dateType: "json",
                url: "/orderAction/doOrderDelete",
                data:{orderId:orderId},
                success: function (result) {
                    if(result.flag == "true") {
                        $(obj).parents("tr").remove();
                        layer.msg('已删除!',{icon:1,time:1000});
                    } else {
                        layer.msg('删除失败!',{icon: 2,time:1000});
                    }
                },
                error: function (err) {
                    layer.msg('请求异常!',{icon: 2,time:1000})
                }
            });

        });
    }
</script>

</body>
</html>
